<template>
  <Card>

    <div slot="title" align="center">
      <Button type="text" size="small" @click="backClick" style="float: left">
        <Icon type="ios-arrow-back" style="margin-right: 5px"></Icon>
        返回
      </Button>

      <h4>文章编辑</h4>
    </div>

    <div class="body">
      <my-edit :id="id"></my-edit>
    </div>
  </Card>
</template>

<script>
  import myEdit from './public/editComponent';

  export default {
    name: "UpdataArticle",
    components: {
      myEdit
    },
    data() {
      return {
        id: -100,
        back: ''
      }
    },
    created() {
      this.id = this.$route.params.id;
      this.back = this.$route.params.back;
    },
    methods: {
      backClick() {
        this.$router.push({name: this.back})
      }
    }
  }
</script>

<style lang="stylus" scoped>
  .body
    height: 100%
</style>
